<div th:fragment="details">

    <div class="modal fade" id="myModal"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">登录日志详情</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="loginAccount" class="control-label">登录帐号:</label>
                        <input type="text" class="form-control"  readonly="readonly" id="loginAccount" name="loginAccount">
                    </div>

                    <div class="form-group">
                        <label for="ip" class="control-label">IP地址:</label>
                        <input type="text" class="form-control"  readonly="readonly"   id="ip" name="ip">
                    </div>

                    <div class="form-group">
                        <label for="browser" class="control-label">浏览器:</label>
                        <input type="text" class="form-control"  readonly="readonly"   id="browser" name="browser">
                    </div>

                    <div class="form-group">
                        <label for="loginPlace" class="control-label">登录位置:</label>
                        <input type="text" class="form-control"   readonly="readonly"  id="loginPlace" name="loginPlace">
                    </div>

                    <div class="form-group">
                        <label for="operatingSystem" class="control-label">操作系统:</label>
                        <input type="text" class="form-control"  readonly="readonly"   id="operatingSystem" name="operatingSystem">
                    </div>

                    <div class="form-group">
                        <label  class="control-label">用户名称:</label>
                        <select class="form-control" autocomplete="off" id="status">
                            <option value="1" >正常</option>
                            <option value="2" >失败</option>
                        </select>
                    </div>

                    <div class="form-group">
                        <label for="info" class="control-label">信息:</label>
                        <input type="text" class="form-control"    readonly="readonly" id="info" name="info">
                    </div>
                    <div class="form-group">
                        <label for="loginTime" class="control-label">登录时间:</label>
                        <input type="text" class="form-control"   readonly="readonly" id="loginTime" name="loginTime">
                    </div>



                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>

            </div>
        </div>
    </div>

    <script>
        //加載用戶編輯彈框
        function EditViewById(id){
            $('#myModal').modal();
            const data = {
                id: id
            };
            myrequest("/admin/loginLog/details",data,'GET',function(data){
                $("#ip").val(data.data.ip);
                $("#loginAccount").val(data.data.loginAccount);
                $("#browser").val(data.data.browser);
                $("#loginPlace").val(data.data.loginPlace);
                $("#operatingSystem").val(data.data.operatingSystem);
                $("#info").val(data.data.info);
                $("#status").val(data.data.status);
                $("#loginTime").val(data.data.loginTime);
            }, function(data){
                toastr.error(data.msg);
            })
        }

    </script>

</div>